home *** CD-ROM | disk | FTP | other *** search
- ATARI MACHINE SPECIFIC LIBRARY
-
-
-
- NAME
- EasySprite - simplified sprite creation routines
-
- SYNOPSIS
- #include <EasySprite.h>
-
- Sprite* GetSprite(Screen&,int x,int y,int h,int attr,
- int n=1,int dx=16,int dy=0);
-
- Sprite* GetMobileSprite(Screen&,int x,int y,int h,int attr,
- int n=1,int dx=16,int dy=0);
-
- Incarnation* GetIncarnation(Screen& S,int x,int y,int h,int attr);
-
- #define ...
-
- DESCRIPTION
- For many purposes, the creation facilities of the Incarnation,
- Sprite and MobileSprite classes are too general - and take a
- large about of code to set-up individual sprite incarnations.
-
- When the programmer wants to create a sprite with a homogeneous
- type of incarnation (eg. all 16x16 Colour ones) by loading them
- from a screen drawn with a drawing program, these functions
- suffice.
-
- FUNCTIONS
-
- Sprite* GetSprite(Screen&,int x,int y,int h,int attr,
- int n=1,int dx=16,int dy=0);
-
- Sprite* GetMobileSprite(Screen&,int x,int y,int h,int attr,
- int n=1,int dx=16,int dy=0);
-
- Get a Sprite or MobileSprite from the given Screen, using the n
- images of height h, from (x,y) in steps of (+dx,+dy). All
- Incarnations in the Sprite will have attributes as close as
- possible to those requested. (See CONSTANTS below)
-
- Incarnation* GetIncarnation(Screen& S,int x,int y,int h,int attr);
- Get an Incarnation of the given height from (x,y) on the given
- screen, with attributes as close as possible to those requested.
-
- CONSTANTS
- The attributes requested by the above functions should be a
- combination of one or more of these:
-
- SP_MONO
- Monochrome
-
- SP_COLOUR
- 16-Colour
-
- SP_WIDE
- 32 pixels wide
-
- SP_FAST
- Faster, but use 32 times as much memory
-
- SP_HOTCENTRE
- Hot spot of incarnations placed in there centre
-
- USAGE
- Load a screen, then extract images with the above functions.
- The screen need no longer exist once images are extracted.
-
- EXAMPLES
- Screen images("sprites.pi1");
- Sprite* spaceship=GetSprite(images,32,50,16,SP_COLOUR);
-
- SEE ALSO
- Sprite, MobileSprite, Screen
-
- AUTHOR
- Warwick Allison, 1992.
- warwick@cs.uq.oz.au
-
- COPYING
- This functionality is part of the Atari Machine Specific Library,
- and is Copyright 1992 by Warwick W. Allison.
-
- The Atari Machine Specific Library is free and protected under the
- GNU Library General Public License.
-
- You are free to copy and modify these sources, provided you acknowledge
- the origin by retaining this notice, and adhere to the conditions
- described in the GNU LGPL.
-